package neo.app.action;

import neo.core.common.PagingList;

public class AclAction extends BaseAction {
	private PagingList aclList;
	
	//角色列表
	public String list(){
		aclList = getServMgr().getAclService().getAllAcl();
		return "list";
	}
	
	//添加角色 准备
	public String addPre(){
		return "addPre";
	}
	
	//添加角色
	public String add(){
		if(getServMgr().getAclService().addAcl(getParameters())){
			addMessage("添加权限成功");
			addRedirURL("返回", "acl!list.action");
		}else{
			addMessage("操作失败");
			addRedirURL("返回", "@back");
		}
		return EXECUTE_RESULT;
	}
	
	//---------
	public PagingList getAclList() {
		return aclList;
	}

	public void setAclList(PagingList aclList) {
		this.aclList = aclList;
	}
	
	
}
